From: Carlos Garnacho Date: Wed, 14 Feb 2018 11:39:27 +0000 (+0100) Subject: keyboard: Do key presses on actual key press X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~994^2^2~35 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=0608413b9679d7277494c2f14f62cb2ed9acefc1;p=gnome-shell.git keyboard: Do key presses on actual key press It was mistakenly connecting twice to the 'released' signal. Also, move level changes to key release, since it will be more convenient to hook latched states on long press. https://gitlab.gnome.org/GNOME/gnome-shell/issues/46 --- diff --git a/js/ui/keyboard.js b/js/ui/keyboard.js index 5864fd5f5..270166997 100644 --- a/js/ui/keyboard.js +++ b/js/ui/keyboard.js @@ -807,14 +807,14 @@ var Keyboard = new Lang.Class({ let actor = extraButton.keyButton; + extraButton.connect('pressed', Lang.bind(this, function() { + if (keyval != null) + this._keyboardController.keyvalPress(keyval); + })); extraButton.connect('released', Lang.bind(this, function() { if (switchToLevel != null) this._onLevelChanged(switchToLevel); else if (keyval != null) - this._keyboardController.keyvalPress(keyval); - })); - extraButton.connect('released', Lang.bind(this, function() { - if (keyval != null) this._keyboardController.keyvalRelease(keyval); else if (action == 'hide') this.hide();